package com.sina.medical.service.user;

import com.sina.medical.core.base.BaseCriteria;
import com.sina.medical.core.exception.SinaCustomException;
import com.sina.medical.dao.user.UserDao;
import com.sina.medical.domain.user.User;
import com.sina.medical.service.MedicalDataSourceService;
import org.hibernate.exception.DataException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * 段浩杰   2017-10-24-16:21
 */
@Service("userService")
public class UserServiceImpl extends MedicalDataSourceService implements UserService {

    @Autowired
    @Qualifier("userDao")
    private UserDao userDao;

    @Override
    public boolean isExist(Integer uid) {
        return false;
    }

    @Override
    public User saveUser(User user) {
        return null;
    }

    @Override
    public void checkExist(Integer uid) throws SinaCustomException {

    }

    @Override
    public Serializable create(Object entity) {
        return null;
    }

    @Override
    public User getUserById(Integer userId) {
        return userDao.get(User.class, userId);
    }

    @Override
    public void update(Object entity) {

    }

    @Override
    public void createOrUpdate(Object entity) {

    }

    @Override
    public User getUserByIdCheckExist(Integer userId) {
        return null;
    }

    @Override
    public <T> T get(Class<T> entityClass, Serializable id) {
        return null;
    }

    @Override
    public void delete(Object entity) {

    }

    @Override
    public void delete(Collection entities) {

    }

    @Override
    public <T> boolean delete(Class<T> entityClass, Serializable id) {
        return false;
    }

    @Override
    public <T> List<T> list(Class<T> clazz, int page, int max) {
        return null;
    }

    @Override
    public <T> List<T> list(Class<T> clazz, BaseCriteria criteria, long[] count) {
        return null;
    }

    @Override
    public <T> T getWithException(Class<T> entityClass, Serializable id) throws DataException {
        return null;
    }

    @Override
    public boolean isExists(Class<?> entityClass, Serializable id) {
        return false;
    }

    @Override
    public <T> boolean isExistsByUnique(Class<T> entityClass, String propName, Serializable uniqueProp) throws SinaCustomException {
        return false;
    }

    @Override
    public void isExistsWithException(Class<?> entityClass, Serializable id) throws SinaCustomException {

    }
}
